home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / rexx / smacros.lha / FWMacros / Create_BusinessLetter.arexx < prev    next >
Text File  |  1994-12-17  |  5KB  |  137 lines

  1. /*  Create_BusinessLetter
  2. A Macro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 80918.
  3. © Copyright 1994 Steven. R. Giovenella, All rights reserved. 
  4. This macro is my gift to the Amiga community.  It may be given away free to 
  5. anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of 
  6. reproduction, downloading, shipping, or handling, without express written 
  7. permission from the author listed above.  Any person or company who violates the 
  8. content of the previous sentence, agrees to pay Steven R. Giovenella $1,000 (US) for 
  9. each copy of this macro sold.  This macro may NOT be added to any disk which is to 
  10. be sold for any price or fee, to include shipping and handling.  The ONLY way this 
  11. macro may be distributed is on a disk which is given away 100% free of all charges, 
  12. or on via telecommunications networks which do not charge any additional fee as a 
  13. result of a user downloading this particular macro.  This macro may only be 
  14. reproduced in its entirety, including all comment lines and code.  The individual 
  15. user may alter this macro for personal use, but may not then distribute the macro 
  16. in any modified form.  If you wish, feel free to send me some cash, a Christmas card, 
  17. some other piece of software, or absolutely nothing as a gift for creating this macro.  
  18. The author of this software is not responsible for any data loss or damage to 
  19. computer equipment as a result, direct or indirect, of the use of this macro. */
  20.  
  21. Options results
  22.  
  23.     Showmessage 2 0 '"                                      ** WARNING **" "                This 
  24. macro will alter the current document." "If you have not already done so, save before 
  25. proceeding." "     Proceed     " "      Save now        " "    Quit    "'
  26.     IF Result = 2 THEN SaveAs
  27.     IF Result = 3 THEN Exit
  28.  
  29. /* Input Required Data */
  30.  
  31. RequestText '"Create Business Letter   (SENDER)" "Enter Title..." "Mr"'
  32.     SENDERTitle=Result||"."
  33. RequestText '"Create Business Letter  (SENDER)" "Enter Name..." ""'
  34.     SENDERName=Result
  35. RequestText '"Create Business Letter  (SENDER)" "Enter Job Title" ""'
  36.     SENDERJobTitle=Result
  37. RequestText '"Create Business Letter  (SENDER)" "Enter Company" ""'
  38.     SENDERCompany=Result
  39. RequestText '"Create Business Letter  (SENDER)" "Enter Company Address (Line 
  40. 1/2)" ""'
  41.     SENDERCompanyAdd1=Result
  42. RequestText '"Create Business Letter  (SENDER)" "Enter Company Address (Line 
  43. 2/2)" ""'
  44.     SENDERCompanyAdd2=Result
  45.  
  46. RequestText '"Create Business Letter   (RECIPIENT)" "Enter Title..." "Mr"'
  47.     RECIPIENTTitle=Result||"."
  48. RequestText '"Create Business Letter  (RECIPIENT)" "Enter Name..." ""'
  49.     RECIPIENTName=Result
  50. RequestText '"Create Business Letter  (RECIPIENT)" "Enter Job Title" ""'
  51.     RECIPIENTJobTitle=Result
  52. RequestText '"Create Business Letter  (RECIPIENT)" "Enter Company" ""'
  53.     RECIPIENTCompany=Result
  54. RequestText '"Create Business Letter  (RECIPIENT)" "Enter Company Address 
  55. (Line 1/2)" ""'
  56.     RECIPIENTCompanyAdd1=Result
  57. RequestText '"Create Business Letter  (RECIPIENT)" "Enter Company Address 
  58. (Line 2/2)" ""'
  59.     RECIPIENTCompanyAdd2=Result
  60.  
  61. /* Figure Inittials */
  62. DO i=1 to LENGTH(SENDERname)
  63.     IF RIGHT(LEFT(SENDERname,i),1)=" " THEN DO
  64.         LastInitial = RIGHT(LEFT(SENDERname,i+1),1)
  65.         END
  66.     END
  67.     Initials = LEFT(SENDERname,1)||Lastinitial||"/"
  68.     
  69. RequestText '"Create Business Letter" "Add Typist Initials (lower case)" "'Initials'"'
  70.     TypistInitials=Result
  71. RequestText '"Create Business Letter" "Add Enclosure (delete text if none)" "ENC: "'
  72.     Enclosure=Result
  73. RequestText '"Create Business Letter" "Add Carbon Copy (delete text if none)" "cc: "'
  74.     Carbon=Result
  75.  
  76. /* Create Document */
  77.  
  78. Type SENDERtitle SENDERname
  79. NewParagraph
  80. Type SENDERcompany
  81. IF SENDERcompany="" THEN Backspace
  82. NewParagraph
  83. Type SENDERcompanyadd1
  84. NewParagraph
  85. Type SENDERcompanyadd2
  86. NewParagraph
  87. NewParagraph
  88. Insert Date
  89. NewParagraph
  90. NewParagraph
  91. NewParagraph
  92. Type RECIPIENTname
  93. IF RECIPIENTname="" THEN Backspace
  94. NewParagraph
  95. Type RECIPIENTjobtitle
  96. IF RECIPIENTjobtitle="" THEN Backspace
  97. NewParagraph
  98. Type RECIPIENTcompany
  99. IF RECIPIENTcompany="" THEN Backspace
  100. NewParagraph
  101. Type RECIPIENTcompanyadd1
  102. NewParagraph
  103. Type RECIPIENTcompanyadd2
  104. NewParagraph
  105. NewParagraph
  106. NewParagraph
  107. IF RECIPIENTname="" THEN Do
  108.     Type "Dear Sir:" 
  109.     END
  110. IF RECIPIENTname~="" THEN Do
  111.     Type "Dear" RECIPIENTtitle RECIPIENTname":"
  112.     END
  113. NewParagraph
  114. NewParagraph
  115. NewParagraph
  116. NewParagraph
  117. Type "Sincerely,"
  118. NewParagraph
  119. NewParagraph
  120. NewParagraph
  121. NewParagraph
  122. NewParagraph
  123. Type SENDERname
  124. NewParagraph
  125. Type SENDERjobtitle
  126. NewParagraph
  127. NewParagraph
  128. NewParagraph
  129. Type Enclosure
  130. NewParagraph
  131. NewParagraph
  132. Type carbon
  133. DO i=1 to 13
  134.     Cursor UP
  135.     END
  136.  
  137.